<?php /* УТФ-8:fix */

class SPIcontroller__consts__front extends SPIcontroller__consts
{
    public function get_list()
    {
        $r = array();
        
        $qres = SPIm::I('consts')->front->select();
        
        while( $item = $qres->fetch() )
        {
            $r[ $item['key'] ] = $item['value'];
        }
        
        return $r;
    }

    public function get( $key )
    {
        $item = SPIm::I('consts')->front->get_by_key( $key );

        if( $item === false )
        {
            return false;
        }

        return $item['value'];
    }
}
